import 'package:flutter_pb_demo/net/pb_function.dart';
import 'package:flutter_pb_demo/proto/gen/version.pb.dart';
import 'package:flutter_pb_demo/proto/gen/common.pb.dart';

String _getModuleName() {
  return "version.VersionExtObj";
}

// 获取最新版本
Future<HttpModel<GetLastVersionRes>> getLastVersion(GetLastVersionReq req) {
  return executeNet(req, GetLastVersionRes(), _getModuleName(), "GetLastVersion");
}

// 上报版本更新
Future<HttpModel<InstallReportRes>> installReport(InstallReportReq req) {
  return executeNet(req, InstallReportRes(), _getModuleName(), "InstallReport");
}

// 获取渠道版本显示规则
Future<HttpModel<GetViewHideInfoRes>> getViewHideInfo(GetViewHideInfoReq req) {
  return executeNet(req, GetViewHideInfoRes(), _getModuleName(), "GetViewHideInfo");
}
